<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/common/taglibs.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的记事本</title>
<script type="text/javascript" src="${ctx}/scripts/fckeditor/fckeditor.js"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/styles/longtian/main.css">
<style type="text/css">
body {
	margin-top:10px;
	margin-left:10px;
	margin-right:10px;
}
.yellow_border4 {
	background-color: #FFF7E2;
	border: 1px solid #FCE6B2;
}
.textField{
	border: 0px;
	border-bottom: 1px solid #696969;
	width: 700px;
	padding: 0px 5px 0px 5px;
	color: #35355F;
}

.button{
 padding: 5px 5px 2px 5px; background-color: FCE6B2;border: 1px solid #FAA551;
}
</style>
</head>
<body>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
  	  <iframe width="100%" frameborder="0" scrolling="no" src="${ctx}/pages/center_top.jsp" height="110"></iframe>
      <br>
      <hr width="1000" style="border: 2px solid #FCE6B2;">
    </td>
  </tr>
</table>
<form action="save.do" method="post" onsubmit="return judge();">
<s:hidden name="model.id"/>
<table width="800" border="0" align="center">
	<tr>
		<td><%@ include file="/common/messages.jsp"%></td>
	</tr>
</table>
<table width="800" align="center">
  <tr>
    <td width="80" align="right">标题：</td>
    <td width="720">
      <s:textfield name="model.title" id="title" cssClass="textField" />
    </td>
  </tr>
  <tr>
    <td width="80" style="padding-top:5px;" valign="top" align="right">内容：</td>
    <td width="720" style="padding-top:5px;">
      <s:textarea name="model.content" id="content"/>
    </td>
  </tr>
  <tr>
    <td width="80"></td>
    <td width="720">
      <input type="submit" value="保　存">
      <input type="reset" value="重　置">
    </td>
  </tr>
</table>
</form>
<%@include file="/pages/bottombar.jsp" %>
<script type="text/javascript">
function preFckEditor(){
	var fckEditor = new FCKeditor( 'content' ) ;
    fckEditor.BasePath = "${ctx}/scripts/fckeditor/";
    fckEditor.ToolbarSet = 'BasicA';
    fckEditor.Width = 700;
    fckEditor.Height = 320;
    fckEditor.ReplaceTextarea();
}
preFckEditor();

function judge(){
	title = document.getElementById("title").value;
	if (title != null && title.length > 0 ){
		return true;
	}else{
		alert('标题不能为空！ ');
		return false;
	}
}
</script>

</body>
</html>